﻿#include "flatcuttingmac.h"

FlatCuttingmac::FlatCuttingmac()
{
    //添加各种参数到列表中
    initRootParasList();
    initRootHMIConfigurationList(m_allParasList);//超级用户界面配置
    initPatternsParasList();
    initSoftwareParasList(m_allParasList);
    initTimeParasList(m_allParasList);
    initMcParasList();
    initWkParasList();

    //初始化控制动作列表
    initOutCtrlList();

    //初始化快捷功能列表
    initShortCutList();

    //初始化辅助功能列表
    initAssistList();

    //初始化文件设置功能列表
    initFileSetList();

    //参数分类功能
    initParaSetList();

    //初始化传感器列表
    initSensorList();

    //初始化错误代码和状态列表
    initErrorCodeAndStateList();

    //初始化九宫格
    initNinebtn1234();

    //加载右上角信息
    initFileInfoLabel();
}

FlatCuttingmac::~FlatCuttingmac()
{

}

void FlatCuttingmac::initNinebtn1234()
{
    m_nineBtn.insert(1,NineItem(FUN_ALLTOZERO,"buttonAllToZero"));//全部归零
    m_nineBtn.insert(2,NineItem(FUN_FLAT_SETANCHORPOINT,"buttonSetEmbPoint"));//定定位点
    m_nineBtn.insert(3,NineItem(FUN_PROCESSRESET,"buttonProcessReset"));//流程复位
    m_nineBtn.insert(4,NineItem(FUN_SIMULATED_STATUS,"buttonSimulatedStatus"));// 模拟工作状态
}

void FlatCuttingmac::initFileInfoLabel()
{
    m_fileInfo.append(FileName);//文件名
    //    m_fileInfo.append(Index);
    m_fileInfo.append(Schedule);//进度
    m_fileInfo.append(BeginPoint);//起始点
    m_fileInfo.append(Range);//范围
    m_fileInfo.append(Position);//位置
    m_fileInfo.append(Production);//产量
}

//文件参数
void FlatCuttingmac::initPatternsParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    // 拟合小针步,小于此值的针步将被合并
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_PATTERN,
    //                                        PATTERNPARA_SORT_PLT ,
    //                                        FIT_SMALL, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Fit small needle step"),//拟合小针步
    //                                        0, 0, S32_MAX, 0, 2, "mm", tr(""),//毫米
    //                                        tr(""), 0, 0,0x0001, operate));

    // 直线最小步长
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_PATTERN,
    //                                        PATTERNPARA_SORT_PLT ,
    //                                        MINIMUM_STEP, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Minimum step size for straight lines"),//直线最小步长
    //                                        0, 0, S32_MAX, 0, 2, "mm", tr(""),//毫米
    //                                        tr(""), 0, 0,0x0001, operate));

    // 直线步长
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        MAXIMUM_STEP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Linear step size"),//直线步长
                                        200, 0, 1000, 200, 2, "mm", tr(""),//毫米
                                        tr(""), 0, 0,0x0001, operate));

    // 圆弧转角判断度数
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        JUDGMENT_DEGREE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Judgment degree of arc angle"),//圆弧转角判断度数
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0,0x0001, operate));

    // 圆弧补偿步长
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        ARC_COMPENSATION, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Arc compensation step size"),//圆弧补偿步长
                                        10, 0, 1000, 10, 2, "mm", tr(""),//毫米
                                        tr(""), 0, 0,0x0001, operate));

    // 切刀1圆弧补偿半径
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        ARC_COMPENSATION_1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Arc compensation radius for cutter 1"),//切刀1圆弧补偿半径
                                        50, 0, 1000, 50, 2, "mm", tr(""),//毫米
                                        tr(""), 0, 0,0x0001, operate));

    // 切刀2圆弧补偿半径
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        ARC_COMPENSATION_2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Arc compensation radius for cutter 2"),//切刀2圆弧补偿半径
                                        50, 0, 1000, 50, 2, "mm", tr(""),
                                        tr(""), 0, 0,0x0001, operate));

    //    // 最小切割速度, 范围 1--100，单位mm/s，默认 10
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_PATTERN,
    //                                        PATTERNPARA_SORT_PLT ,
    //                                        CUT_SPD_MINPPS, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Minimum cutting speed"),//最小切割速度
    //                                        10, 1, 100, 10, 0, "mm/s", tr(""),
    //                                        tr(""), 0, 0,0x0001, operate));

    //    // 最大切割速度, 范围 1--1200，单位mm/s，默认 1000
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_PATTERN,
    //                                        PATTERNPARA_SORT_PLT ,
    //                                        CUT_SPD_MAXPPS, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Maximum cutting speed"),//最大切割速度
    //                                        1000, 1, 1200, 1000, 0, "mm/s", tr(""),
    //                                        tr(""), 0, 0,0x0001, operate));

    //    // 切割加速度, 范围 1--4000，单位mm/s2，默认 500
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_PATTERN,
    //                                        PATTERNPARA_SORT_PLT ,
    //                                        CUT_ADD_PPSG, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Cutting acceleration"),//切割加速度
    //                                        500, 1, 4000, 500, 0, "mm/s2", tr(""),
    //                                        tr(""), 0, 0,0x0001, operate));

    //    // 切割降速最小偏差角度,范围 0--18000，单位 0.01度，默认 3000
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_PATTERN,
    //                                        PATTERNPARA_SORT_PLT ,
    //                                        CUT_SLOW_ANGLE, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Minimum deviation angle for cutting speed reduction"),//切割降速最小偏差角度
    //                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
    //                                        tr(""), 0, 0,0x0001, operate));

    //    // 工作最小加速度
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_PATTERN,
    //                                        PATTERNPARA_SORT_PLT ,
    //                                        CUT_WORK_MINADD, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Minimum working acceleration"),//工作最小加速度
    //                                        1, 1, 10, 1, 0, "mm/s2", tr(""),
    //                                        tr(""), 0, 0,0x0001, operate));

    // 落刀补偿
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_PATTERN,
    //                                        PATTERNPARA_SORT_PLT ,
    //                                        CUT_RNF1_COMP, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Knife drop compensation"),//落刀补偿
    //                                        0, 0, 300, 0, 2, "mm", tr(""),
    //                                        tr(""), 0, 0,0x0001, operate));
    // 抬刀补偿
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_PLT ,
                                        CUT_RNF2_COMP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife lifting compensation"),//抬刀补偿
                                        0, 0, 300, 0, 2, "mm", tr(""),
                                        tr(""), 0, 0,0x0001, operate));
}

//主控机器参数
void FlatCuttingmac::initMcParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();
//    // 刀座1安装刀类型选择
//    0,无 1,圆刀 2,震刀 3,铣刀 4,偏心刀1 5,偏心刀2 6,画笔 7,尖刀 8,钻孔 9,压轮
//        m_allParasList.append(makeAParaItem(0,
//                                            PARA_TYPE_MACH,
//                                            MC_SORT_SETTING,
//                                            10, 0, 0, PARA_VALUE_TYPE_LIST,
//                                            tr("Knife holder 1 installation knife type"),//刀座1安装刀类型
//                                            0, 0, 9, 0, 0, tr(""), tr(""),
//                                            //无:0;圆刀:1;震刀:2;铣刀:3;偏心刀1:4;偏心刀2:5;画笔:6;尖刀:7;钻孔:8;压轮:9
//                                            tr("Null:0;Round knife:1;Shockknife:2;milling cutter:3;Eccentric knife 1:4;"
//                                               "Eccentric knife 2:5;brush:6;Sharp knife:7;drill hole:8;Pressure wheel:9"),
//                                            0, 0, 0x0001, operate));

//     刀座2安装刀类型选择
//        m_allParasList.append(makeAParaItem(0,
//                                            PARA_TYPE_MACH,
//                                            MC_SORT_SETTING,
//                                            11, 0, 0, PARA_VALUE_TYPE_LIST,
//                                            tr("Knife holder 2 installation knife type"),//刀座2安装刀类型
//                                            0, 0, 9, 0, 0, tr(""), tr(""),
//                                            //无:0;圆刀:1;震刀:2;铣刀:3;偏心刀1:4;偏心刀2:5;画笔:6;尖刀:7;钻孔:8;压轮:9
//                                            tr("Null:0;Round knife:1;Shockknife:2;milling cutter:3;Eccentric knife 1:4;"
//                                               "Eccentric knife 2:5;brush:6;Sharp knife:7;drill hole:8;Pressure wheel:9"),
//                                            0, 0, 0x0001, operate));

//     刀座3安装刀类型选择
//        m_allParasList.append(makeAParaItem(0,
//                                            PARA_TYPE_MACH,
//                                            MC_SORT_SETTING,
//                                            12, 0, 0, PARA_VALUE_TYPE_INT,
//                                            tr("Knife holder 3 installation knife type"),//刀座3安装刀类型
//                                            0, 0, 9, 0, 0, tr(""), tr(""),
//                                            //无:0;圆刀:1;震刀:2;铣刀:3;偏心刀1:4;偏心刀2:5;画笔:6;尖刀:7;钻孔:8;压轮:9
//                                            tr("Null:0;Round knife:1;Shockknife:2;milling cutter:3;Eccentric knife 1:4;"
//                                               "Eccentric knife 2:5;brush:6;Sharp knife:7;drill hole:8;Pressure wheel:9"),
//                                            0, 0, 0x0001, operate));

    // X向格子数,范围0-24
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        13, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of X-direction grids"),//X向格子数
                                        0, 0, 24, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //Y向格子数,范围0-19
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        14, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of Y-direction grids"),//Y向格子数
                                        0, 0, 19, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // X向采集长度,单位mm,范围-5000-5000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        15, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X-direction acquisition length"),//X向采集长度
                                        0, -5000, 5000, 0, 0, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // Y向采集长度,单位mm,范围-5000-5000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        16, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y-direction acquisition length"),//Y向采集长度
                                        0, -5000, 5000, 0, 0, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // X向采集起始位置,单位mm,范围-5000-5000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        17, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting position of X-direction collection"),//X向采集起始位置
                                        0, -5000, 5000, 0, 0, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // Y向采集起始位置,单位mm,范围-5000-5000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        18, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting position of Y-direction collection"),//Y向采集起始位置
                                        0, -5000, 5000, 0, 0, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // X框传感器坐标,单位 0.01mm,范围-500000-500000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        20, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X-box sensor coordinates"),//X框传感器坐标
                                        0, -500000, 500000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // Y框传感器坐标,单位 0.01mm,范围-500000-500000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        21, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y-box sensor coordinates"),//Y框传感器坐标
                                        0, -500000, 500000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座1升降传感器高度,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        22, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 lifting sensor height"),//刀座1升降传感器高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 刀座2升降传感器高度,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        23, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 lifting sensor height"),//刀座2升降传感器高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 40

    // 可移动区域(X-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        40, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (X -)"),//可移动区域(X-)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 可移动区域(X+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        41, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (X +)"),//可移动区域(X+)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 可移动区域(Y-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        42, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (Y-)"),//可移动区域(Y-)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 可移动区域(Y+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        43, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (Y+)"),//可移动区域(Y+)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // x可切割区域负边界(X-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        44, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Negative boundary of X cuttable region(X-)"),//x可切割区域负边界(X-)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // x可切割区域正边界(X+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        45, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Positive boundary of the X cutting region(X+)"),//x可切割区域正边界(X+)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // y可切割区域正边界(Y-), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        46, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Negative boundary of Y cuttable region(Y-)"),//y可切割区域负边界(Y-)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // y可切割区域正边界(Y+), 范围 -2147483648--2147483647，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        47, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Positive boundary of the Y cutting region(Y+)"),//y可切割区域正边界(Y+)
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));


    // 画笔相对位置X,单位0.01mm
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_SETTING,
    //                                        64, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Brush relative position X"),//画笔相对位置X
    //                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
    //                                        tr(""),
    //                                        0, 0, 0x0001, operate));

    // 画笔相对位置Y,单位0.01mm
    //    m_allParasList.append(makeAParaItem(0,
    //                                        PARA_TYPE_MACH,
    //                                        MC_SORT_SETTING,
    //                                        65, 0, 0, PARA_VALUE_TYPE_INT,
    //                                        tr("Brush relative position Y"),//画笔相对位置Y
    //                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
    //                                        tr(""),
    //                                        0, 0, 0x0001, operate));

    //66
    // 刀座1相对位置X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        66, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 relative position X"),//刀座1相对位置X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座1相对位置Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        67, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 relative position Y"),//刀座1相对位置Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 刀座2相对位置X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        68, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 relative position X"),//刀座2相对位置X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 刀座2相对位置Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_POSITION,
                                        69, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 relative position Y"),//刀座2相对位置Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座1升降上限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        80, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 lifting upper limit"),//刀座1升降上限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座1升降下限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        81, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 1 lifting lower limit"),//刀座1升降下限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座2升降上限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        82, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 lifting upper limit"),//刀座2升降上限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 刀座2升降下限,单位0.01mm,范围-100-10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        83, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife holder 2 lifting lower limit"),//刀座2升降下限
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));


    // 偏心刀1加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        95, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric tool 1 machining lifting height"),//偏心刀1加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 偏心刀1加工落刀高度，范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        96, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric tool 1 machining tool drop height"),//偏心刀1加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 偏心刀2加工抬刀高度, 范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        97, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric tool 2 machining lift height"),//偏心刀2加工抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 偏心刀2加工落刀高度，范围 -100--10000，单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        98, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric tool 2 machining tool drop height"),//偏心刀2加工落刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //刀压检测工装抬刀高度 单位0.01mm 范围 -100--10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        106, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife pressure detection tool lifting height"),//刀压检测工装抬刀高度
                                        0, -100, 10000, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //偏心刀1拐角升降,单位0.01mm 范围-500-500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        107, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric knife 1 corner lifting"),//偏心刀1拐角升降
                                        0, -500, 500, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    //偏心刀2拐角升降,单位0.01mm 范围-500-500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        108, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric knife 2 corner lifting"),//偏心刀2拐角升降
                                        0, -500, 500, 0, 2, "mm", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 130
    // XY归零运行速度, 范围 1--100，单位mm/s，默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        130, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY zero running speed"),//XY归零运行速度
                                        100, 1, 100, 100, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // XY空走运行速度, 范围 100--500,单位mm/s，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        131, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY idle running speed"),//XY空走运行速度
                                        200, 100, 500, 200, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // xy手动移动速度1, 范围 10--50，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        132, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Xy manual movement speed 1"),//xy手动移动速度1
                                        10, 10, 50, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // xy手动移动速度2, 范围 50--200，单位mm/s，默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        133, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Xy manual movement speed 2"),//xy手动移动速度2
                                        100, 50, 200, 100, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // xy手动移动速度3, 范围 200--500，单位mm/s，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        134, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Xy manual movement speed 3"),//xy手动移动速度3
                                        200, 200, 500, 200, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 135
    // 升降归零速度,单位mm/s,范围1-50
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        135, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Zero speed of lifting and lowering"),//升降归零速度
                                        10, 1, 50, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 升降空走速度,范围 10-100, 单位mm/s，默认 50
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        136, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lifting and descending speed"),//升降空走速度
                                        50, 10, 100, 50, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 升降手动移动速度,范围 5--20，单位mm/s，默认 5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        137, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Manual movement speed for lifting and lowering"),//升降手动移动速度
                                        5, 5, 20, 5, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 141
    // 最小速度变化限制 默认10 范围1-20
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        141, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum speed change limit"),//最小速度变化限制
                                        10, 1, 20, 10, 0, "", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 偏心刀1最小切割速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        166, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum cutting speed of Eccentric knife 1"),//偏心刀1最小切割速度
                                        10, 1, 100, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 偏心刀1最大切割速度, 范围 1--800，单位mm/s，默认 600
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        167, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum cutting speed of Eccentric knife1"),//偏心刀1最大切割速度
                                        600, 1, 800, 600, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 偏心刀1切割加速度, 范围 1--5000,单位mm/s2，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        168, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric knife 1 cutting acceleration"),//偏心刀1切割加速度
                                        500, 1, 5000, 500, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 偏心刀1切割降速最小偏差角度,范围 0--18000，单位 0.01度，默认 3000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        169, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum deviation angle for cutting speed reduction with a Eccentric knife 1"),//偏心刀1切割降速最小偏差角度
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 偏心刀2最小切割速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        170, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum cutting speed of Eccentric knife 2"),//偏心刀2最小切割速度
                                        10, 1, 100, 10, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));
    // 偏心刀2最大切割速度, 范围 1--800,单位mm/s,默认 600
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        171, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum cutting speed of Eccentric knife 2"),//偏心刀2最大切割速度
                                        600, 1, 800, 600, 0, "mm/s", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 偏心刀2切割加速度, 范围 1--5000，单位mm/s2，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SPEED,
                                        172, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Eccentric knife 2 cutting acceleration"),//偏心刀2切割加速度
                                        500, 1, 5000, 500, 0, "mm/s2", tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

    // 偏心刀2切割降速最小偏差角度,范围 0--18000，单位 0.01度，默认 3000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_ACTION,
                                        173, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum deviation angle for cutting speed reduction with a Eccentric knife 2"),//偏心刀2切割降速最小偏差角度
                                        3000, 0, 18000, 3000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

}

void FlatCuttingmac::initWkParasList()
{
//    QTextCodec *cod = QTextCodec::codecForLocale();
    // 79
    // 风机启动延时, 范围 0--10，单位秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        79, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Fan start delay"),// 风机启动延时
                                        0, 0, 10, 0, 0, "s", tr(""),
                                        tr(""), 0, 0, 0x0001, operate));
    // 风机关闭延时, 范围 0--30,单位秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        80, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Fan shutdown delay"),// 风机关闭延时
                                        0, 0, 30, 0, 0, "s", tr(""),
                                        tr(""), 0, 0, 0x0001, operate));

    // 产量预设, 0, 关闭功能；其余，按照预设产量提示
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        81, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Production preset"),// 产量预设
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, operate));

    // 完成后停车位置选择, 0, 当前位置
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        82, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Parking location selection after completion"),// 完成后停车位置选择
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr("current location:0;starting point:1;Offset point:2;origin Point:3"),0, 0, 0x0001, operate));//当前位置 0 ，起点1 偏移点2,原点3

    // 吸附区域选择,按位设置
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        83, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Adsorption Zone 1"),// 吸附区域1
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        83, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("Adsorption Zone 2"),// 吸附区域2
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        83, 3, 0, PARA_VALUE_TYPE_SW,
                                        tr("Adsorption Zone 3"),// 吸附区域3
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        83, 4, 0, PARA_VALUE_TYPE_SW,
                                        tr("Adsorption Zone 4"),// 吸附区域4
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0001, operate));

    // 横切起始位置,单位0.01mm,范围-500000-500000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        84, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting position of cross cutting"),// 横切起始位置
                                        0, -500000, 500000, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    // 横切结束位置,单位0.01mm,范围-500000-500000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        85, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("End position of cross cutting"),// 横切结束位置
                                        0, -500000, 500000, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    // 86
    // 横切x向补偿距离,单位0.01mm,范围-2000-2000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        86, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Cross cutting compensation distance"),// 横切补偿距离
                                        0, -2000, 2000, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));

    // 99

    // 安全输入允许，位图选择，0, 不允许; 1, 允许;
    // bit0, 光幕;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DETECT,
                                        100, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Secure input light curtain allows"),// 安全输入光幕允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x0001, operate));
    // bit1 气压;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DETECT,
                                        100, 2, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Safety input pressure allowed"),// 安全输入气压允许
                                        1, 0, 1, 1, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 1, 1, 0x0001, operate));

    // 开机动作 //bit 0 电机归零
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        101, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Startup motor to zero"),// 开机电机归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x0001, operate));

    // 功能控制
    //bit0 :风机吸附开关   0,手动 1,自动
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        102, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Fan adsorption switch"),// 风机吸附开关
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("manual:0;auto:1"), 0, 0, 0x0001, operate));
    //bit1 :横切功能选择   0,手动 1,自动
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        102, 2, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Cross cutting function selection"),// 横切功能选择
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("manual:0;auto:1"), 0, 0, 0x0001, operate));

    //bit2 :被动旋转刀   0,手动 1,自动
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        102, 3, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Passive rotary knife"),// 被动旋转刀
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("manual:0;auto:1"), 0, 0, 0x0001, operate));

    // 偏移点坐标X,单位0.01mm, 范围 -2147483648--2147483647
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        103, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset X"),// 偏移点坐标 X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    // 偏移点坐标Y,单位0.01mm, 范围 -2147483648--2147483647
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        104, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset Y"),// 偏移点坐标 Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));

    // 刀压检测坐标X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        105, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife Check X"),// 刀压检测坐标X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    // 刀压检测坐标Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        106, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Knife Check Y"),// 刀压检测坐标Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));

    //  被动刀旋转坐标X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        107, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Passive knife rotation coordinate X"),// 被动刀旋转坐标X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    //  被动刀旋转坐标Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        108, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Passive knife rotation coordinate Y"),// 被动刀旋转坐标Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));

    // 109 原点坐标X,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        109, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Origin coordinates X"),// 原点坐标X
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));
    // 110 原点坐标Y,单位0.01mm
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        110, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Origin coordinates Y"),// 原点坐标Y
                                        0, S32_MIN, S32_MAX, 0, 2, "mm", tr(""),
                                        tr(""),0, 0, 0x0001, operate));

    //111


}

void FlatCuttingmac::initOutCtrlList()
{
    m_allOutCtrlList.clear();
    int showPriority = 1;
    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("X to move motor"),MT_LX));// X向移动电机(归零,正转,反转)
    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("Y to move motor"),MT_LY));// Y向移动电机(归零,正转,反转)
    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("Left Knife motor"),MT_LU1));// 左刀电机(归零,正转,反转)
    m_allOutCtrlList.append(creatZeroForwardReverseItem(0,showPriority++,tr("Right Kinife motor"),MT_LU2));// 右刀电机(归零,正转,反转)

    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Knife pressure collection"),KNIFE_COLLECT,//刀压采集
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Left Knife pressure test"),KNIFE_U1_TEST,//左刀刀压测试
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Right Kinife pressure test"),KNIFE_U2_TEST,//右刀刀压测试
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Set the position for tool pressure detection"),SET_KNIFETEST_POS,//设置刀压检测位置
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Set passive knife rotation position"),SET_KNIFEROT_POS,//设置被动刀旋转位置
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Rotating passive knife"),PASSIVE_KNIFE_ROT,//旋转被动刀
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Rotating passive knife 1"),U1_PASSIVE_KNIFE_ROT,//旋转被动刀1
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Rotating passive knife 2"),U2_PASSIVE_KNIFE_ROT,//旋转被动刀2
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Transverse cutting"),CROSS_CUT,//横切
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,MANUALACTION_RUN,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Adsorption main switch"),OT_MAINADSORB,// 吸附总开关
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Adsorption 1 switch"),OT_ADSORB1,// 吸附1开关
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Adsorption 2 switch"),OT_ADSORB2,// 吸附2开关
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Adsorption 3 switch"),OT_ADSORB3,// 吸附3开关
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));
    m_allOutCtrlList.append(makeAOutCtrlItem(0,showPriority++,tr("Adsorption 4 switch"),OT_ADSORB4,// 吸附4开关
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));


}

void FlatCuttingmac::initShortCutList()
{
    m_allShortCutList.clear();
    int index = 1;
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("All_Zero"),"buttonAllToZero",FUN_ALLTOZERO));// 全部归零
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("SetPositioning"),"buttonSetEmbPoint",FUN_FLAT_SETANCHORPOINT));//定定位点

    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("backCuttingPoint"),"buttonBackWorkPoint",FUN_CUTTINGPOINT));// 回切割点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("backZeroPoint"),"buttonBackToOrigin",FUN_BACKTOORIGIN));// 回零点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("SetOffsetPoint"),"buttonSetAnchorPoint",FUN_SETOFFSETPOINT));// 定偏移点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("backOffsetPoint"),"buttonBackOffsetPoint",FUN_BACKOFFSETPOINT));// 回偏移点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("backStartPoint"),"buttonBackEmbPoint",FUN_BACKSTARTPOINT));// 回起始点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Front_Back"),"buttonForwardOrBack",FUN_FORWARDORBACK));// 快进快退
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("ProcessReset"),"buttonProcessReset",FUN_PROCESSRESET));//流程复位
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("OutputReset"),"buttonFrameZero",FUN_OUTPUTRESET));//产量清零

    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("gotoFinish"),"buttonBackAnchorPoint",FUN_GOTO_FINISH));// 回结束点

    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Simulated"),"buttonSimulatedStatus",FUN_SIMULATED_STATUS));// 模拟工作
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Knife pressure collection"),"buttonKnifePressureCollection",FUN_KNIFE_COLLECT));//刀压采集
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Display collected data"),"DisplayCollectedData",FUN_DISPLAY_COLLECTED_DATA));//显示采集数据
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Knife pressure test"),"KnifePressure",FUN_KNIFE_TEST));//刀压测试
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Fan area"),"buttonFanCtrl",FUN_FAN_AREA));//风机区域
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Set the position for tool pressure detection"),"SetPositionDetection",FUN_SET_KNIFETEST_POS));//设置刀压检测位置
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Set passive knife rotation position"),"SetPassiveKnifeRotationPosition",FUN_SET_KNIFEROT_POS));//设置被动刀旋转位置
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Rotating passive knife"),"RotatingPassiveKnife",FUN_ROT_PASSIVE_KNIFE));//旋转被动刀
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Rotating passive knife 1"),"RotatingPassiveKnife",FUN_ROT_PASSIVE_KNIFE1));//旋转被动刀座1
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Rotating passive knife 2"),"RotatingPassiveKnife",FUN_ROT_PASSIVE_KNIFE2));//旋转被动刀座2
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Cross cutting"),"chiselPoint",FUN_CROSS_CUT));//横切
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Speed Select"),"buttonSpeedParas",FUN_SPD_SELECT));//速度选择


}

void FlatCuttingmac::initAssistList()
{
    m_allAssistList.clear();

    m_allAssistList.append(makeAAssistItem(0,0x0001,tr("Signal"),"buttonSensor",ASSIST_SENSOR));//传感器信号
    m_allAssistList.append(makeAAssistItem(0,0x0002,tr("Action"),"buttonControlAction",ASSIST_CONTROLACTION));//控制动作
    m_allAssistList.append(makeAAssistItem(0,0x0003,tr("HMIUpgrade"),"buttonHMIUpgrade",ASSIST_HMIUPGRADE));//界面升级
    m_allAssistList.append(makeAAssistItem(0,0x0004,tr("MCUpgrade"),"buttonMCUpgrade",ASSIST_MCUPGRADE));//主控升级
    m_allAssistList.append(makeAAssistItem(0,0x0006,tr("ParaImport"),"buttonParaImport",ASSIST_PARAIMPORT));//参数导入
    m_allAssistList.append(makeAAssistItem(0,0x0007,tr("ParaExport"),"buttonParaExport",ASSIST_PARAEXPORT));//参数导出
    m_allAssistList.append(makeAAssistItem(0,0x0008,tr("SoftwareSet"),"buttonSoftwareSet",ASSIST_SOFTWARESET));//软件设置
    m_allAssistList.append(makeAAssistItem(0,0x000A,tr("Network"),"buttonNetworkManage",ASSIST_NETWORK));//网络管理
    m_allAssistList.append(makeAAssistItem(0,0x000C,tr("Time"),"buttonTimeSet",ASSIST_TIMESET));//时间设置
    m_allAssistList.append(makeAAssistItem(0,0x000F,tr("Version"),"buttonVersionInfo",ASSIST_MCVERSION));//版本信息
    m_allAssistList.append(makeAAssistItem(0,0x0014,tr("Root"),"buttonRoot",ASSIST_ROOT));//超级用户
}

void FlatCuttingmac::initFileSetList()
{
    m_allPatternSetList.clear();

    m_allPatternSetList.append(makeAPatternSetItem(0,0x0002,tr("Para"),"buttonPatternPara",PATTERNSET_ALGORITHMPARA));//分割参数
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0001,tr("Select"),"buttonPatternSelect",PATTERNSET_PATTERNSELECT));//文件选择
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0004,tr("Import"),"buttonPatternImport",PATTERNSET_PATTERNIMPORT));//文件导入
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0005,tr("Export"),"buttonPatternExport",PATTERNSET_PATTERNEXPORT));//文件导出
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0006,tr("Delete"),"buttonPatternDelete",PATTERNSET_PATTERNDELETE));//文件删除
}

void FlatCuttingmac::initParaSetList()
{
    m_allParaSetList.clear();

    m_allParaSetList.append(makeAParaSetItem(0,0x0001,tr("WorkPara"),"buttonActionSet",PARASET_SETTING));//工作参数
    m_allParaSetList.append(makeAParaSetItem(0,0x0002,tr("ActionSet"),"buttonActionParas",PARASET_ACTION));//动作参数(290810)
    m_allParaSetList.append(makeAParaSetItem(0,0x0003,tr("SpeedPara"),"buttonSpeedParas",PARASET_SPEED));//速度参数(290810)
    m_allParaSetList.append(makeAParaSetItem(0,0x0004,tr("DetectPara"),"buttonDetectParas",PARASET_DETECT));// 检测参数(290810)
    m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("PositionPara"),"buttonPositionParas",PARASET_POSITION));//位置参数(290810)
    m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("AllPara"),"buttonSettingParas",PARASET_ALL));//全部参数(262574)
}

#define	DSS_BIT1		0x01	// idx1
#define	DSS_BIT2		0x02	// idx2
#define	DSS_BIT3		0x04	// idx3
#define	DSS_BIT4		0x08	// idx4
#define	DSS_BIT5		0x10	// idx5
#define	DSS_BIT6		0x20	// idx6
#define	DSS_BIT7		0x40	// idx7
#define	DSS_BIT8		0x80	// idx8

#define	DSS1_B_START_BT		0x0000	// 启动按钮(1~8)
#define	DSS1_B_PAUSE_BT		0x0001	// 暂停按钮(1~8)
#define	DSS1_B_READY_BT		0x0005	// 就绪按钮(1~8)
#define	DSS2_F1_X		DSS_BIT1	// X  (主框架X)
#define	DSS2_F1_Y		DSS_BIT2	// Y  (主框架Y)
#define	DSS2_F1_ZERO_POS	0x0020	// 框架(轴)1 零位
#define	DSS2_UD_CU1_POS		0x0048	// 裁切机头 高位(1~8)
#define	DSS1_B_AIR_TEST		0x0007	// 气压检测(1~8)
#define	DSS_HEAD_01		DSS_BIT1	// idx1
#define	DSS_HEAD_02		DSS_BIT2	// idx2
#define	DSS_HEAD_03		DSS_BIT3	// idx3
#define	DSS_HEAD_04		DSS_BIT4	// idx4
#define	DSS_HEAD_05		DSS_BIT5	// idx5
#define	DSS_HEAD_06		DSS_BIT6	// idx6
#define	DSS_HEAD_07		DSS_BIT7	// idx7
#define	DSS_HEAD_08		DSS_BIT8	// idx8
#define	DSS1_B_SAFE_TEST	0x0008	// 安全输入(1~8)

// J1
//#define IsStartButton			GetInput1Status	// 启动按钮
//#define IsStopButton			GetInput2Status	// 停止按钮
//#define IsStartButton2			GetInput3Status	// 启动按钮2(双手启动)
//#define	IsResetButton			GetInput4Status	// 复位按钮

#define	N1_INPUT1_IDX		DSS1_B_START_BT		// 启动按钮
#define	N1_INPUT1_BIT		DSS_BIT1
#define	N1_INPUT2_IDX		DSS1_B_PAUSE_BT		// 暂停按钮
#define	N1_INPUT2_BIT		DSS_BIT1
#define	N1_INPUT3_IDX		DSS1_B_START_BT		// 启动按钮
#define	N1_INPUT3_BIT		DSS_BIT2
#define	N1_INPUT4_IDX		DSS1_B_READY_BT		// 复位按钮
#define	N1_INPUT4_BIT		DSS_BIT1

// J2
//#define IsXZeroPos			GetInput7Status		// X零位

#define	N1_INPUT7_IDX		DSS2_F1_ZERO_POS	// 框架(轴)1 零位
#define	N1_INPUT7_BIT		DSS2_F1_X

// J3
//#define IsAirPressureOk			GetInput10Status		// 气压保护检测
#define	N1_INPUT10_IDX		DSS1_B_AIR_TEST		// 气压检测
#define	N1_INPUT10_BIT		DSS_BIT1

//#define IsYZeroPos			GetInput11Status		// Y零位

#define	N1_INPUT11_IDX		DSS2_F1_ZERO_POS	// 框架(轴)1 零位
#define	N1_INPUT11_BIT		DSS2_F1_Y

// J4
#if (LIFT_U1 == 1)
#define IsU1ZeroPos			GetInput13Status		// U1零位

#define	N1_INPUT13_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT13_BIT		DSS_HEAD_01

#define IsU1ZPPos			GetInput14Status		// U1 ZP

#define	N1_INPUT14_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT14_BIT		DSS_HEAD_04

#endif

#if (LIFT_U2 == 1)
#define IsU2ZeroPos			GetInput15Status		// U2零位

#define	N1_INPUT15_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT15_BIT		DSS_HEAD_02

#define IsU2ZPPos			GetInput16Status		// U2 ZP

#define	N1_INPUT16_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT16_BIT		DSS_HEAD_05

#endif

// J5
#if (KNIFE_PRESSURE == 1)
#define IsKnifeCheckPos		GetInput18Status		// 刀压检测
#define	N1_INPUT18_IDX		DSS2_UD_CU1_POS
#define	N1_INPUT18_BIT		DSS_HEAD_07
#endif

// J6
//#define IsSafetyInput			GetInput21Status	// 光幕
#define	N1_INPUT21_IDX		DSS1_B_SAFE_TEST
#define	N1_INPUT21_BIT		DSS_BIT1

//初始化传感器列表
void FlatCuttingmac::initSensorList()
{

    QList <SensorItem> sensorList;

    sensorList.append(makeASensorItem(DSS1_B_START_BT, 0, tr("Start button 1")));//启动按钮1
    sensorList.append(makeASensorItem(DSS1_B_START_BT, 1, tr("Start button 2")));//启动按钮2
    sensorList.append(makeASensorItem(DSS1_B_PAUSE_BT, 0, tr("Pause button 1")));//暂停按钮1
    sensorList.append(makeASensorItem(DSS1_B_READY_BT, 0, tr("Reset button")));//复位按钮
    sensorList.append(makeASensorItem(DSS2_F1_ZERO_POS, 1, tr("X zero position")));//X零位
    sensorList.append(makeASensorItem(DSS2_F1_ZERO_POS, 0, tr("Y zero position")));//Y零位
    sensorList.append(makeASensorItem(DSS1_B_AIR_TEST, 0, tr("Pressure protection detection")));//气压保护检测
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 1, tr("U1 zero position")));//U1零位
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 0, tr("U1 ZP")));//U1 ZP
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 3, tr("U2 zero position")));//U2零位
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 4, tr("U2 ZP")));//U2 ZP
    sensorList.append(makeASensorItem(DSS2_UD_CU1_POS, 6, tr("Knife pressure detection")));//刀压检测
    sensorList.append(makeASensorItem(DSS1_B_SAFE_TEST, 0, tr("Light curtain")));//光幕

    //将机型所需的传感器列表替换到传感器整体列表中
    for(int i = 0; i < sensorList.size(); i++)
    {
        int byteaddr = sensorList[i].m_byte_offset;
        int bitaddr = sensorList[i].m_bit_offset;
        QString str = sensorList[i].m_name;
        int type = sensorList[i].m_type;

        int idx = byteaddr*8+bitaddr;
        if(idx < m_allSensorList.size())
        {
            m_allSensorList[idx].m_name = str;
            m_allSensorList[idx].m_type = type;
        }
    }
}


//平板切割机报警
#define	STA_MTZ_SUCCESS			0x0101		// 归零成功
#define	STA_NORMAL_STOP			0x0100		// 正常停止

void FlatCuttingmac::initErrorCodeAndStateList()
{
    m_allErrorCodeAndStateList.clear();

    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NOT_SAFE,tr("freedom from error")));               // 安全区域介入
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_AIR_POWER,tr("Not powered on")));       // 气压不足
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_COOR_SYSTM,tr("Coordinate system error")));         // 坐标系统错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_OUT_RANGE,tr("Target position out of bounds")));       // 目标位置越界
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_X_LIT_POSI,tr("X positive limit")));       // X正向限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_X_LIT_NEGA,tr("X reverse limit")));       // X反向限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_Y_LIT_POSI,tr("Y positive limit")));       // Y正向限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_Y_LIT_NEGA,tr("Y reverse limit")));       // Y反向限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_LIFT_COOR_SYSTM,tr("Error in the coordinate system of the lifting motor")));       // 升降电机坐标系统错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_MTZ_SUCCESS,tr("Zero successfully")));       // 归零成功
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_NORMAL_STOP,tr("Normal stop")));       // 正常停止
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EXPIRATION,tr("The usage deadline has expired")));       // 使用时限已到
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NOT_ALLOWED,tr("Work status not allowed")));       // 不允许工作状态
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NO_DATA,tr("No data available")));       // 无数据
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_DATA_ERROR,tr("data error")));       // 数据错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_GRAPH_OUT_RANGE,tr("Shape out of range")));       // 图形超出范围
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_MC_PARA,tr("Machine parameter error")));       // 机器参数错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_RUN_LIMIT,tr("Sports limit")));       // 运动限位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_LIFT_OUT_RANGE,tr("Head lifting position out of range")));       // 机头升降位置越界
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_YZR_NOT_SYNC,tr("Y-direction motor not synchronized")));       // Y向电机不同步

}
